<template>
	<view>
		<view v-if="loading" class="flex_center flex_items">
			<view class="loading spin"></view>
			<view class="loading_txt">加载中...</view>
		</view>
		<view v-else>
			<view v-if="list.length == 0 || (list.length > 0 && list[0].length == 0)">
				<image mode="aspectFill" class="empty_icon" src="/images/empty.png"></image>
				<view class="space100"></view>
				<view class="notData">没有数据哦</view>
				<view class="space100"></view>
			</view>
			<block v-else-if="isMore && next == 0"><view class="f26 c9 txt_center ptb30 mt40">——没有更多了——</view></block>
		</view>
	</view>
</template>

<script>
let common = getApp().globalData.commonFun;
let util = getApp().globalData.utilFun;
export default {
	name: 'loading',
	props: {
		loading: {
			type: Boolean,
			default: false
		},
		list: {
			type: Array,
			default: []
		},
		next: {
			type: Number,
			default: 0
		},
		isMore: {
			type: Boolean,
			default: true
		}
	},
	data() {
		return {};
	},

	methods: {}
};
</script>

<style>
.loading_txt {
	margin-left: 40rpx;
	color: #969799;
	font-size: 28rpx;
	padding: 100rpx 0;
}

@keyframes spin {
	from {
		transform: rotate(0deg);
	}

	to {
		transform: rotate(360deg);
	}
}
.notData {
	font-size: 26rpx;
	color: #999;
	text-align: center;
}
.empty_icon {
	width: 478rpx;
	height: 257rpx;
	display: block;
	margin: 0 auto;
	margin-bottom: 20rpx;
	margin-top: 150rpx;
}
</style>
